<?php 
/**
 *   Joomdiet - administrator/components/views/default/tmpl/default.php
 *   Author: Juan Dapena Paz (juan@bittingbits.com)
 *   Copyright (C) 2010 Bitting Bits S.L.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
defined('_JEXEC') or die('Restricted access'); ?>
<?php jimport('joomla.html.pane'); ?>
<form action="index.php" method="post" name="adminForm" >
<input type="hidden" name="check" value="post" />
<div id="col100">
    <table cellspacing="0" cellpadding="0" border="0" width="100%">
        <tr><td valign="top">
        <fieldset class="adminform">
            <legend><?php echo JText::_('COM_BBITSSD_EDIT_LEGEND'); ?></legend>
            <input type="hidden" name="country_id" id="country_id" value="<?php echo $this->row->id; ?>"/>
            <table class="adminform">
            	<tr>
            	<td><?php echo JText::_('ZONE'); ?></td>
            		<td>

  
  
  <?php

if(isset($this->row->zone)):
  $default = $this->row->zone;
else:
	$default = '';
endif;
 
  ## Initialize array to store dropdown options ##
  $options = array();
 
  foreach($this->groups as $g) :
    ## Create $value ##
		
    $options[] = JHTML::_('select.option', $g->id, $g->title);
  endforeach;
 
  ## Create <select name="month" class="inputbox"></select> ##
  $dropdown = JHTML::_('select.genericlist', $options, 'group_id', 'class="inputbox"', 'value', 'text', $default);
 
  ## Output created <select> list ##
  echo $dropdown;

  ?>
            		
            		</td>
            	</tr>
                <tr>
                    <td width="100" align="right" class="key">
                        <label for="country_name"><?php echo JText::_('COM_BBITSSD_TITLECOUNT'); ?></label>
                    </td>
                    <td>
                        <input class="text_area required" type="text" name="country_title" id="country_title" size="32" maxlength="140" value="<?php echo $this->row->title;?>" />
                    </td>
                </tr>
                
                <tr>
                	<td><?php echo JText::_('COM_BBITSSD_FLAG'); ?></td>
                	<td><br />
                	<?php if($this->row->flag!=''): ?>
                		<img src="<?php echo JURI::base(); ?>/components/com_bbitsd/assets/flags/<?php echo $this->row->flag;?>.png" alt="flag" />
                	<?php endif;?>
                	
                	<input type="text" name="flag" id="flag" value="<?php echo $this->row->flag;?>" /> example: es
                	
                	</td>
                </tr>
                
                <tr>
                	<td><?php echo JText::_('COM_BBITSSD_DESCCOUN'); ?></td>
                	<td>
                	<?php
					$editor =& JFactory::getEditor();
					echo $editor->display('description', $this->row->description, '550', '300', '60', '20', false);
				?>
                	
                	</td>
                </tr>
                

			
              </table>
        </fieldset>
        </td>
        
       </tr>
       </table>
</div>

<input type="hidden" name="option" value="com_bbitsd" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="controller" value="countries" />

</form>

